%Margin setup
\def\standardsetup{
\textheight        245mm %640pt
\textwidth         170mm \columnwidth       \textwidth \footskip
0.3in
\topmargin        -5mm % 3cm margin
\oddsidemargin    -5mm
\evensidemargin   0.0in
\parindent        10mm
}
\standardsetup

% Some spacings
\newcommand{\dblspace}{\setlength{\baselineskip}{0.8cm}}
\newcommand{\sglspace}{\setlength{\baselineskip}{11truept}}
\newcommand{\tablinespace}{\renewcommand{\arraystretch}{1.2}}


\newlength{\pagewidth}
\setlength{\pagewidth}{\textwidth}

%finalheadings
\def\ps@thesisheadings{
\let\@mkboth\markboth
\def\@oddfoot{}
\def\@oddhead{\makebox[\textwidth][l]{\underline{\hbox to \pagewidth{\bf
\raisebox{0ex}[0ex][1.2ex]\firstmark\hfill\thepage}}}}%
\def\@evenfoot{}
\def\@evenhead{\makebox[\textwidth][r]{\underline{\hbox to \pagewidth{\bf
\raisebox{0ex}[0ex][1.2ex]\thepage\hfill\@lhead}}}}%
\def\chaptermark##1{\mark{}\def\@lhead{##1}}%
\def\sectionmark##1{{\let\protect\noexpand\mark{\thesection
    \hskip 1em##1}}}}

%bibheadings Added by Eric Hayman to prevent latex screwing up, for
%            some strange reason, on the header for the bibliography
% BJT: Adjusted two-sided version to also print 'bibliography' as
%      there are no sections
\def\ps@bibheadings{
\let\@mkboth\markboth
\def\@oddfoot{}
\def\@oddhead{\makebox[\textwidth][l]{\underline{\hbox to \pagewidth{\bf
\raisebox{0ex}[0ex][1.2ex]Bibliography \hfill\thepage}}}}%
\def\@evenfoot{}
\def\@evenhead{\makebox[\textwidth][r]{\underline{\hbox to \pagewidth{\bf
\raisebox{0ex}[0ex][1.2ex]\thepage\hfill Bibliography}}}}%
\def\chaptermark##1{\mark{}\def\@lhead{wibble}}%
\def\sectionmark##1{{\let\protect\noexpand\mark{\thesection
    \hskip 1em##1}}}}


%special_plain for first pages of each chapter
\def\ps@specialheadings{\def\@oddfoot{}
\def\@oddhead{\makebox[\textwidth][l]{\hbox to \pagewidth {\hfill
{\bf \raisebox{0ex}[0ex][1.2ex]{\thepage}}}}}
\def\@evenfoot{}
\def\@evenhead{\makebox[\textwidth][r]{\hbox to \pagewidth {\hfill
{\bf \raisebox{0ex}[0ex][1.2ex]{\thepage}}}}}
}
